<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePrtAdminTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('prt_admin', function (Blueprint $table) {
            $table->increments('id');
            $table->string("username",20)->default('')->comment('用户名');
            $table->string('nickname',50)->default('')->nullable()->comment("昵称");
            $table->string("password",32)->default('')->comment('密码');
            $table->string("salt",30)->default('')->nullable()->comment('密码盐');
            $table->string("avatar",100)->default('')->nullable()->comment('头像');
            $table->string("email",100)->default('')->nullable()->comment('邮箱');
            $table->string("mobile",15)->default('')->nullable()->comment('手机');
            $table->tinyInteger('status')->default(1)->comment('状态');
            $table->integer('logintime')->default(0)->nullable()->comment("登录时间");
            $table->integer('group_id')->default(1)->comment("所属组id");
            $table->string('token',30)->default('')->comment("认证token");
            $table->tinyInteger('deleted_at')->default(null)->nullable()->comment('软删除');
            $table->integer('created_at')->nullable()->comment("创建时间");
            $table->integer("updated_at")->nullable()->comment("更新时间");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('prt_admin');
    }
}
